###########################################
# Coefficients presented in the text of Section 4

###########################################


# Estimation

dep <- "perc_yes ~"
main <- "log(avg_costLPG_weighted_AGI) + "
Xs_elFE <-  paste("turnout","Bond","failed_recently",sep = "+")
FEs <- "|LEAID + election_FE|0"
cluster <- "|LEAID "

dfreg <- df[df$one_election ==0,]
dfreg25 <- dfreg[dfreg$tight_election ==1,]

R0 <- felm(data = dfreg25,weights = dfreg25$population_votingage,formula = as.formula(paste(dep,main,Xs_elFE,FEs,cluster,sep = "")))

stargazer(R0,
          type = "text",
          omit.stat = c("ser","f"),
          digits = 2,
          omit = c("turnout","Bond","failed_recently"),
          omit.table.layout = "n",
          report = "vc*sp",
          dep.var.labels.include =   FALSE)

rm(list=setdiff(ls(), c("df","city")))
